import request from '@/utils/request'

/*
* 获取运输任务分页数据的接口
*  */
export const fetchTransportListAPI = (data) => {
  return request({
    url: '/manager/transport-task-manager/page',
    method: 'POST',
    data
  })
}

/*
*取消运输任务的接口
*  */
export const cancelTransportAPI = (id) => {
  return request({
    url: `/manager/transport-task-manager/cancel/${id}`,
    method: 'PUT'
  })
}

/*
*
* 手动调整 发车前调整车次 车辆 司机的接口
*  */
export const changeAdjustAPI = (data) => {
  return request({
    url: `/manager/transport-task-manager/adjust/${data.id}`,
    method: 'PUT',
    data
  })
}

/*
* 获取运输任务详情的接口
*  */
export const fetchTransportDetailAPI = (id) => {
  return request({
    url: `/manager/transport-task-manager/${id}`,
    method: 'GET'
  })
}

/* 获取运输任务坐标的接口 */
export const fetchTransportMapAPI = (id) => {
  return request({
    url: `/manager/transport-task-manager/point/${id}`,
    method: 'GET'
  })
}

/*
*
* 获取车次列表的接口
*  */
export const fetchTripsAPI = (transportLineId) => {
  return request({
    url: `/manager/transportLine/trips`,
    method: 'GET',
    params: {
      transportLineId
    }
  })
}
